package com.lotus.lqmp.service.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lotus.platform.common.model.enums.DeletedStatusEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lotus.lqmp.service.dao.EcuInventoryMapper;
import com.lotus.lqmp.service.dao.entity.EcuInventoryDo;
import com.lotus.lqmp.service.service.EcuInventoryService;
import com.lotus.platform.common.biz.impl.BaseBiz;

/**
 * ECU清单表Service业务层处理
 *
 * @author Shiheng.Liu1
 * @date 2022-03-29
 */
@Service
public class EcuInventoryServiceImpl extends BaseBiz<EcuInventoryMapper, EcuInventoryDo>  implements EcuInventoryService{
    @Autowired
    private EcuInventoryMapper ecuInventoryMapper;

    @Override
    public EcuInventoryDo getByReviewPlanNo(String projectId) {
        QueryWrapper<EcuInventoryDo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("deleted_status", DeletedStatusEnum.normal.getCode());
        queryWrapper.eq("pis_project_id", projectId);
        return ecuInventoryMapper.selectOne(queryWrapper);
    }
}
